﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebLibSolPedBE;
using LibSolPedDALC;

namespace LibSolPedLN
{
    public class cLiberaReservaLN
    {
        private string _connId = string.Empty;

        public static cLiberaReservaLN Instance()
        {
            if (_instance == null)
            {
                lock (typeof(cLiberaReservaLN))
                {
                    if (_instance == null)
                    {
                        _instance = new cLiberaReservaLN();
                    }
                }
            }
            return _instance;
        }

        private cLiberaReservaLN(string pConnId) { this._connId = pConnId; }
        private cLiberaReservaLN() { }
        private static volatile cLiberaReservaLN _instance = null;

        public List<ReservaBE> getLstReserva()
        {
            List<ReservaBE> lst = new List<ReservaBE>();
            lst = LiberaReservaDALC.Instance().getLstReserva();

            return lst;
        }

        public string setLiberaReserva(string IP_NRORESERV, string IP_POSRESERV)
        {
            string ret = "";
            if (IP_NRORESERV != "" && IP_POSRESERV != "")
            {
                ret = LiberaReservaDALC.Instance().setLiberaReserva(IP_NRORESERV, IP_POSRESERV);
            }
            else
            {
                ret = "Seleccione un documento válido a liberar.";
            }
            return ret;
        }
    }
}
